HADOOP_HOME=/home/kelvin/hadoop

jar: compile
	cd bin; jar cf ../pagerank.jar *; cd ..

compile: src/kelvin/pagerank/PageRank.java
	javac -classpath $(HADOOP_HOME)/hadoop-core-0.20.203.0.jar:$(HADOOP_HOME)/lib/commons-cli-1.2.jar src/kelvin/pagerank/PageRank.java -d bin/

run: jar
	- $(HADOOP_HOME)/bin/hadoop dfs -rmr pagerank/output
	$(HADOOP_HOME)/bin/hadoop jar pagerank.jar kelvin.pagerank.PageRank 1.0 0.7 2 pagerank/input pagerank/output

output:
	$(HADOOP_HOME)/bin/hadoop dfs -cat pagerank/output/final/part*
